package co.yixiang.mall.common.bigData.domain;

import co.yixiang.common.mproot.domain.BaseDomain;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import javax.naming.Name;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;
/**
 * @author zfk
 * @date 2021-03-17
 * 分站do
 */
@TableName("yx_substation")
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Data
public class Substation implements Serializable {

    /**
     * ip地址
     */
    @NotBlank(message = "请输入ip地址")
    @ApiModelProperty(value = "ip地址")
    @TableField(value = "ip_address")
    private String ipAddress;
    /**
     * 端口号
     */
    @NotBlank(message = "请输入端口号")
    @ApiModelProperty(value = "端口号")
    @TableField(value = "port")
    private String port;

    /**
     * 数据库账号
     */
    @NotBlank(message = "请输入数据库用户名")
    @ApiModelProperty(value = "数据库用户名")
    @TableField(value = "account")
    private String account;

    /**
     * 数据库密码
     */
    @NotBlank(message = "请输入数据库密码")
    @ApiModelProperty(value = "数据库密码")
    @TableField(value = "password")
    private String password;

    /**
     * 数据库名称
     */
    @NotBlank(message = "请输入数据库名称")
    @ApiModelProperty(value = "数据库名称")
    @TableField(value = "database_name")
    private String databaseName;

    /**
     * 分站标识
     */
    @NotBlank(message = "请输入分站标识")
    @ApiModelProperty(value = "分站标识")
    @TableField(value = "mark")
    private String mark;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date createTime;

    @TableField(value="update_time",fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date updateTime;


}
